Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-9347

Invariant assumption in TestQuorumJournalManager.shutdown() is wrong

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.8.0, 2.7.3, 2.6.5, 3.0.0-alpha1
    • test
    • None
    • Reviewed

    Description

      The code

      TestTestQuorumJournalManager.java
      @After
        public void shutdown() throws IOException {
          IOUtils.cleanup(LOG, toClose.toArray(new Closeable[0]));
          
          // Should not leak clients between tests -- this can cause flaky tests.
          // (See HDFS-4643)
          GenericTestUtils.assertNoThreadsMatching(".*IPC Client.*");
          
          if (cluster != null) {
            cluster.shutdown();
          }
        }
      

      implicitly assumes when the call returns from IOUtils.cleanup() (which calls close() on QuorumJournalManager object), all IPC client connection threads are terminated. However, there is no internal implementation that enforces this assumption. Even if the bug reported in HADOOP-12532 is fixed, the internal code still only ensures IPC connections are terminated, but not the thread.

      Attachments

        1. HDFS-9347.001.patch
          3 kB
          Wei-Chiu Chuang
        2. HDFS-9347.002.patch
          6 kB
          Wei-Chiu Chuang
        3. HDFS-9347.003.patch
          6 kB
          Wei-Chiu Chuang
        4. HDFS-9347.004.patch
          5 kB
          Wei-Chiu Chuang
        5. HDFS-9347.005.patch
          5 kB
          Wei-Chiu Chuang
        6. HDFS-9347.006.patch
          5 kB
          Wei-Chiu Chuang

        Issue Links

          Activity

            People

              weichiu Wei-Chiu Chuang
              weichiu Wei-Chiu Chuang
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: